var myMapCoords = new google.maps.LatLng(52.315242,-1.912952);
var villagehall = new google.maps.LatLng(52.323767,-1.896092);
var registry = new google.maps.LatLng(52.308692,-1.938844);
var registryTxt = '<p>'
				  +'GPS: Redditch, Worcestershire B98 8ER<br/><br/>'
				  +'Notes: very limited parking, look elsewhere for parking</p>';
var hallTxt = '<p>'
	  +'GPS: Beoley, Worcestershire B98 9AN<br/><br/>'
	  +'Notes: Fairly big carpark. 5min drive from travelodge<br/>'
	  +'but is down a small lane so walking will be difficult</p>';
var regmarker,hallmarker;
var map;

function initialize() {
  var mapOptions = {
    zoom: 14,
    mapTypeId: google.maps.MapTypeId.ROADMAP,
    center: myMapCoords,
    disableDoubleClickZoom: true,
    scrollwheel: false,


  };

  map = new google.maps.Map(document.getElementById("map_canvas"),
      mapOptions);

  hallmarker = new google.maps.Marker({
    map:map,
    draggable:false,
    animation: google.maps.Animation.DROP,
    position: villagehall
  });
  
  regmarker = new google.maps.Marker({
	    map:map,
	    draggable:false,
	    animation: google.maps.Animation.DROP,
	    position: registry,
	    title:'Wedding Registry Office'
	  });
  var infowindow = new google.maps.InfoWindow({
	    content: registryTxt
	});
  var infowindow2 = new google.maps.InfoWindow({
	    content: hallTxt
	});
  
  
  google.maps.event.addListener(regmarker, 'click', function() {
	  infowindow.open(map,regmarker);
	});
  google.maps.event.addListener(hallmarker, 'click', function() {
	  infowindow2.open(map,hallmarker);
	});
}
$(function() {
	initialize();
});
